const fs = require("fs")
const path = require("path")

function readfs(url){
    return new Promise((resolve,reject)=>{
        fs.readFile(path.join(__dirname,url),"utf-8",(err,data)=>{
            if(err){
                reject(err)
            }else{  
                resolve(data)
            }
        })
    })
}

module.exports = readfs
